FROM golang:1.17-alpine

MAINTAINER Lishuangzhi

ENV GO111MODULE=on \
    CGO_ENABLED=0 \
    GOOS=linux \
    GOARCH=amd64 \
	GOPROXY="https://goproxy.cn,direct"

WORKDIR /go/src/blog_server

COPY . .

EXPOSE 8972

RUN go get -d -v ./...

RUN go build -o server .

CMD ["./server"]





